#!/usr/bin/env python
# -*- coding: utf-8 -*-

import requests

s = requests.session()

# 后台管理员登陆
data = 'Login_f=1&admin_name=admin&admin_pwd=admin&submit.x=48&submit.y=19'
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
url = 'http://localhost:8888/phpwind_v7.3.2/admin.php?&verify=95baa02c&'
r = s.post(url, data=data, headers=headers)
print(r.text)

# 添加用户
data = 'username=test10&password=123456&email=test10%40test.com&groupid=-1&action=addnew'
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
url = 'http://localhost:8888/phpwind_v7.3.2/admin.php?adminjob=setuser&verify=e523f555&'
r = s.post(url, data=data, headers=headers)
print(r.text)
